# import time
#
# import pytest
# t = time.strftime('%Y%m%d_%H_%M_%S')
# from Tools import log_set,send_mail
# if __name__ == '__main__':
#     time.sleep(3)
#     log_set()                                                   #先执行日志
#     pytest.main(['TestCase.py','-s','--html=baogao.html'])      #报告
#     send_mail([f'log_{t}.txt','baogao.html'])                        #邮件（日志，报告）  #邮件里把日志和报告放进去
import time

import pytest
from Tools import log_set,send_mail


t = time.strftime('%Y%m%d_%H%M%S')
if __name__ == '__main__':
    log_set()
    pytest.main(['TestCase.py','-s','--html=baogao.html'])
    send_mail([f'log_{t}.txt','baogao.html'])